package com.hansen.library.pickerimage;

import android.content.Context;

import com.hansen.library.utils.ScreenSizeUtils;

/**
 * @author han
 * @date 2019/9/6
 */
public class PickImageApplication {
    private Context mContext;

    private static PickImageApplication mPickImageAppInstance;

    public PickImageApplication(Context mContext) {
        this.mContext = mContext;
        ScreenSizeUtils.init(mContext);
    }

    /**
     * 初始化 RongCloud.
     *
     * @param context 上下文。
     */
    public static void init(Context context) {
        if (mPickImageAppInstance == null) {
            synchronized (PickImageApplication.class) {
                if (mPickImageAppInstance == null) {
                    mPickImageAppInstance = new PickImageApplication(context);
                }
            }
        }
    }

    /**
     * 获取RongCloud 实例。
     *
     * @return RongCloud。
     */
    public static PickImageApplication getInstance() {
        return mPickImageAppInstance;
    }

    public Context getContext() {
        return mContext;
    }
}
